package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName task_level
 */
@TableName(value ="task_level")
@Data
public class TaskLevel implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     *
     */
    private String name;

    /**
     *
     */
    private String detail;

    /**
     *
     */
    private String level;

    /**
     *
     */
    private Long lowestScore;

    /**
     *
     */
    private Boolean isLowestScore;

    /**
     *
     */
    private Long assessTableNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TaskLevel other = (TaskLevel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getLowestScore() == null ? other.getLowestScore() == null : this.getLowestScore().equals(other.getLowestScore()))
            && (this.getIsLowestScore() == null ? other.getIsLowestScore() == null : this.getIsLowestScore().equals(other.getIsLowestScore()))
            && (this.getAssessTableNum() == null ? other.getAssessTableNum() == null : this.getAssessTableNum().equals(other.getAssessTableNum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getLowestScore() == null) ? 0 : getLowestScore().hashCode());
        result = prime * result + ((getIsLowestScore() == null) ? 0 : getIsLowestScore().hashCode());
        result = prime * result + ((getAssessTableNum() == null) ? 0 : getAssessTableNum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", detail=").append(detail);
        sb.append(", level=").append(level);
        sb.append(", lowestScore=").append(lowestScore);
        sb.append(", isLowestScore=").append(isLowestScore);
        sb.append(", assessTableNum=").append(assessTableNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
